package cn.jasonone.jasonfx.entity;

import lombok.Getter;
import lombok.Setter;

public class Optional<T> {
	private T value;
	/**
	 * 是否标记变更
	 */
	@Getter
	@Setter
	private boolean change;

	public boolean isNull() {
		return value == null;
	}

	public T get() {
		return value;
	}

	public void set(T value) {
		this.value = value;
		this.change = true;
	}

}
